home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global BoxUp, NoQuiz, ChromosomePairing, rate, timer, Start
- cursor(4)
- set BoxUp to 0
- set Start to 1
- set timer to 0
- resetField(the number of member "Number", 14, "bold", "Helvetica")
- set the visible of sprite 11 to 0
- movieinwindow()
- put EMPTY into field "Number"
- GameStart(ChromosomePairing)
- if ChromosomePairing = 0 then
- set ChromosomePairing to 0.10000000000000001
- end if
- set rate to 1
- cursor(-1)
- end
-
- on movieinwindow
- global myWindow, point
- if objectp(myWindow) then
- forget(myWindow)
- end if
- DisectRect()
- set horzOrigin to value(line 1 of point) + 14
- set vertOrigin to value(line 2 of point) + 94
- set myWindowRect to rect(horzOrigin, vertOrigin, horzOrigin + 593, vertOrigin + 355)
- set myWindow to window "ActualGame"
- set the rect of myWindow to myWindowRect
- set the fileName of myWindow to "CHROMO_M.DIR"
- set the titleVisible of myWindow to 0
- set the visible of myWindow to 0
- end
-
- on DisectRect
- global point
- set point to 0
- put the rect of the stage into line 1 of Temp
- set loop to 1
- set Counter to 6
- repeat with count = 1 to 4
- put "0" into line count of point
- repeat while (char Counter of line 1 of Temp <> ",") and (char Counter of line 1 of Temp <> ")")
- put line count of point & char Counter of line 1 of Temp into line count of point
- set Counter to Counter + 1
- set loop to loop + 1
- end repeat
- set Counter to Counter + 2
- set loop to 1
- end repeat
- end
-
- on stopMovie
- global myWindow
- forget(myWindow)
- set timer to 0
- sound stop 2
- end
-
- on stop
- global timer, myWindow, Start, NoQuiz, QuizWaiting
- cursor(4)
- set Start to 1
- set timer to 0
- tell myWindow
- puppetSound(0)
- end tell
- tell myWindow
- Cleanup()
- end tell
- close(myWindow)
- set NoQuiz to 0
- BStop(30, 34)
- set the visible of sprite 11 to 0
- updateStage()
- go(2)
- put EMPTY into field "Number"
- if QuizWaiting = 1 then
- PopQuiz()
- end if
- cursor(-1)
- end
-
- on EndGame
- global timer, myWindow, Start, rate
- close(myWindow)
- set Start to 1
- set timer to 0
- put "Done. It took you " & WriteTime(11, rate) & ". Your score is " & score() & "." into field "MsgBox"
- put EMPTY into field "Number"
- puppetSound("Win")
- ShowBox()
- end
-
- on score
- global GameScore, ChromosomePairing, NumMatches, Wrong, rate, Difficulty
- set GameScore to (435 * NumMatches) - (15 * time(11, rate)) - (Difficulty / 2 * 100 * Wrong)
- if GameScore < 0 then
- set GameScore to 0
- end if
- if GameScore > ChromosomePairing then
- set ChromosomePairing to GameScore
- end if
- return GameScore
- end
-
- on Help
- global HelpMode, HelpTime, myWindow, timer
- if the frame <= 2 then
- set HelpMode to 1
- end if
- if the frame > 2 then
- set timer to 0
- set HelpMode to 0
- HelpMovie(11)
- set the visible of myWindow to 0
- end if
- puppetSound(0)
- go("Help")
- end
-
- on LeaveHelp
- global HelpMode, HelpTime, myWindow, TimeStart, timer, rate
- puppetSound(0)
- if HelpMode = 1 then
- go(2)
- end if
- if HelpMode = 0 then
- go("Game")
- set the visible of myWindow to 1
- LeaveHelpMovie(11)
- set timer to 1
- end if
- ClearTrackScripts()
- cursor(-1)
- end
-
- on OpenTime
- global myWindow
- open(myWindow)
- end
-
- on ShowBox
- global BoxUp, NoQuiz, QuizWaiting
- if BoxUp = 0 then
- set BoxUp to 1
- BoxShow(22, 24)
- BoxTrackScripts()
- exit
- end if
- if BoxUp = 1 then
- cursor(4)
- set BoxUp to 0
- BSuspend(24, 24)
- BoxHide(22, 24)
- ClearTrackScripts()
- stop()
- go(2)
- ScoreDisplay()
- cursor(-1)
- if QuizWaiting = 1 then
- PopQuiz()
- end if
- end if
- end
-
- on KeyCheck
- global BoxUp
- if BoxUp = 1 then
- if the key = RETURN then
- ShowBox()
- else
- pass()
- end if
- end if
- if BoxUp = 0 then
- pass()
- end if
- end
-
- on ScientistScreen
- cursor(4)
- go(1, the pathName & "UCHIDA_S.DIR")
- cursor(4)
- end
-
- on HideInfoComplete
- global timer, myWindow, rate
- if the frame > 2 then
- set the visible of myWindow to 1
- set the movieRate of sprite 11 to rate
- set timer to 1
- end if
- end
-
- on ShowInfoPrep
- global timer, myWindow
- if the frame > 2 then
- set timer to 0
- set the movieRate of sprite 11 to 0
- set the visible of myWindow to 0
- end if
- return 1
- end
-